import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class Dec {
    public static void file(String fileName) {
        List<String> list = new ArrayList<>();
        BufferedReader br;
        try {
            Reader reader = new FileReader(fileName);
            br = new BufferedReader(reader);
            File Writer=new File("D:\\\\汽车金融\\\\汽车金融_dec_java.txt");
            Writer.createNewFile();
            FileWriter writer=new FileWriter(Writer);
            BufferedWriter writer_out=new BufferedWriter(writer);
            String line;
            while (null!=(line=br.readLine())){
                String[] line_split=line.split("\t");
//                System.out.println(line);
//                System.out.println(line_split.length);
                String line_str="";
                if (line_split.length<2){
                    continue;
                }
//                System.out.println(line_split[2]);
                if (line_split[1].indexOf("filename")!=-1){
                    System.out.println(line_split[2]);
                    writer_out.write("\n");
                    writer_out.write(line_split[2]);
                    writer_out.write("\t");
                    writer_out.flush();
                }
                if(line_split[2].indexOf("text")==-1){
                    continue;
                }
                for (int i=0; i<line_split.length;i++){
                    if(i==0 || i==2){
                        continue;
                    }
//                    System.out.print(line_split[i]+" ");
                    line_str+=line_split[i];
                }
                System.out.println(line_str);
                writer_out.write(line_str);
                writer_out.write("。");
                writer_out.flush();
            }
            br.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static void myArray(){
        int[] nums={2,3,5,7,1,0,12,-2};
//        System.out.println(nums.length);

        int len_i=nums.length;
        for(int i=0;i<len_i;i++){
            System.out.println(nums[i]);
            for(int j=i;j<len_i;j++){
                if (nums[j]<nums[i]){
                    int temp;
                    temp=nums[i];
                    nums[i]=nums[j];
                    nums[j]=temp;



                }
            }
        }
        System.out.print(nums[nums.length-1]);



    }
    public static void main(String[] args) {
//        String file_path="D:\\汽车金融\\汽车金融_dec.txt";
//        file(file_path);
         myArray();

    }
}
